import express from 'express';
import auth from "../middleware/auth.js"
import { getPostById, createPost, updatePost, deletePost, savePost } from '../controllers/posts.js';
const router = express.Router();

router.get('/read/:id', getPostById);
router.port('/create/', auth, createPost);
router.patch('/update/:id', auth, updatePost);
router.delete('/delete/:id', auth, deletePost);
router.patch('/save/:id', auth, savePost);

export default router;

